from appium.webdriver.common.mobileby import MobileBy

from APP_UI_TEST.contacts_podemo.base.base_page import BasePage
from APP_UI_TEST.contacts_podemo.page.edit_member_page import EditMemberPage


class MemberInfoPage(BasePage):
    """ 个人信息页 """
    def _to_more_info(self):
        # 点击个人信息页右上角三个点
        self.driver.find_element(MobileBy.XPATH, "//*[@text='个人信息']/../../../../following-sibling::*[1]").click()

    def to_edit_member_page(self):
        """ 点击编辑成员，进入成员编辑页"""
        self._to_more_info()
        # 6. 点击编辑成员
        self.driver.find_element(MobileBy.XPATH, "//*[@text='编辑成员']").click()
        return EditMemberPage(self.driver)




